package com.yaodian100.ec.jd.remote;

import org.springframework.beans.factory.annotation.Autowired;

import com.jd.ac.sdk.api.JdException;
import com.yaodian100.ec.jd.JDSerivce;

public class RemoteJDOrderSerivceImpl implements RemoteJDOrderSerivce {
	@Autowired
	private JDSerivce jdSerivce;

	@Override
	public String getTrade(String StartDate, String EndDate, String OrderState) throws JdException {
		try {
			int page = 5;
			for (int i = 1; i <= page; i++) {
				jdSerivce.findBuyTimeJDOrderNew(StartDate, EndDate, OrderState, String.valueOf(i), "10");
			}
			return "true";
		} catch (Exception e) {
			return e.toString();
		}

	}

	// @Override
	// public String findBuyOrderIdOrderInfo(String orderId) throws JdException {
	// try {
	// // Orders result = jdSerivce.findBuyOrderIdOrderInfo(orderId);
	// return "true";
	// } catch (Exception e) {
	// return e.toString();
	// }
	// }
}
